from board import Board
from common import PlaceResult


class Player:
    def __init__(self, name, my_board, en_board):
        self.__name = name
        self.__my_board = my_board
        self.__en_board = en_board

    # 放置ship
    def place_ship(self, ship, command) -> PlaceResult:
        return self.get_my_board().place_ship(ship, command)

    # 返回姓名
    def get_name(self) -> str:
        return self.__name

    # 返回放置地图
    def get_my_board(self) -> Board:
        return self.__my_board

    # 返回攻击地图
    def get_en_board(self) -> Board:
        return self.__en_board
